import Vue from "vue"
import SvgIcon from "@/components/svg-icon"// svg组件

// register globally
Vue.component("svg-icon", SvgIcon)

const requireAll = requireContext => requireContext.keys().map(requireContext)
const req = require.context("./svg", false, /\.svg$/)
requireAll(req)

export const svgIcons = req.keys().map(item => {
  return item.split(".")[1].replace("/", "")
})